﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Data;
using System.Data.SqlClient;
using saveimagetodatabase;
using System.ServiceModel;
using  System.IO;
using System.Xml;
namespace WcfServiceLibrary2
{
    
   public class SinhVien
    {
       public string Name { get; set; }
       public String Date{get;set;} 
       public string Address{get;set;}
       public SinhVien()
       {

       }
       public SinhVien(String name, String date, String address)
       {
           this.Date = date;
           this.Name = name;
           this.Address = address;
       }
        public static int InsertSinhvien(SinhVien sv)
        {
            SqlQuery sql = new SqlQuery();
            List<SqlParameter>list=new List<SqlParameter>();
            list.Add(new SqlParameter("@name",sv.Name));
             list.Add(new SqlParameter("@date",sv.Date));
             list.Add(new SqlParameter("@address",sv.Address));
           return  sql.ExcuteProceduteCommand("spsinhvieninsert", list);
        }
    }

}
